<?php
$goodsid = empty($_POST['goodsid']) ? 0 : intval($_POST['goodsid']);
if($goodsid <= 0)echo_msg('fail');
// 商品评价
$oFavorite = new Favorite();
$result = $oFavorite->add_to_favorite($goodsid);
echo_msg($result);
?>